
cc.Class({
    extends: cc.Component,

    properties: {
        hero_list_item:cc.Prefab,
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {

    },
    create_hero(dataArr){
        for(var a=0;a<dataArr.length;a++){
            var item=cc.instantiate(this.hero_list_item);
            item.getComponent("hero_list_item").init(dataArr[a]);
            item.parent=this.node;
            if(a%2===0){
                item.x=60;
            }
        }
    },
    // update (dt) {},
});
